package com.qf.entity;

import org.omg.CORBA.PRIVATE_MEMBER;

import java.io.Serializable;
import java.util.Date;

/**
 * workorder
 * @author 
 */
public class Workorder implements Serializable {
    /**
     * 工单编号
     */
    private Integer id;

    /**
     * 项目编号
     */
    private Integer projectId;

    /**
     * 执行人
     */
    private String executor;

    /**
     * 任务描述
     */
    private String description;

    /**
     * 工单级别
     */
    private String orderlevel;

    /**
     * 创建时间
     */
    private Date createDate;

    private Project project;

    public Project getProject() {
        return project;
    }

    public void setProject(Project project) {
        this.project = project;
    }

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getProjectId() {
        return projectId;
    }

    public void setProjectId(Integer projectId) {
        this.projectId = projectId;
    }

    public String getExecutor() {
        return executor;
    }

    public void setExecutor(String executor) {
        this.executor = executor;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getOrderlevel() {
        return orderlevel;
    }

    public void setOrderlevel(String orderlevel) {
        this.orderlevel = orderlevel;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Workorder other = (Workorder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProjectId() == null ? other.getProjectId() == null : this.getProjectId().equals(other.getProjectId()))
            && (this.getExecutor() == null ? other.getExecutor() == null : this.getExecutor().equals(other.getExecutor()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getOrderlevel() == null ? other.getOrderlevel() == null : this.getOrderlevel().equals(other.getOrderlevel()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProjectId() == null) ? 0 : getProjectId().hashCode());
        result = prime * result + ((getExecutor() == null) ? 0 : getExecutor().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getOrderlevel() == null) ? 0 : getOrderlevel().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "Workorder{" +
                "id=" + id +
                ", projectId=" + projectId +
                ", executor='" + executor + '\'' +
                ", description='" + description + '\'' +
                ", orderlevel='" + orderlevel + '\'' +
                ", createDate=" + createDate +
                ", project=" + project +
                '}';
    }
}